package com.cdut.hwadeefsc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

/**
 * 
 * @TableName homeworks
 */
@TableName(value ="homeworks")
public class homework {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private Integer classId;

    /**
     * 
     */
    private Integer teacherId;

    /**
     * 
     */
    private String courseName;

    /**
     * 
     */
    private String homeworkTitle;

    /**
     * 
     */
    private String homeworkContent;

    /**
     * 
     */
    private Date publishDate;

    /**
     * 
     */
    private Date deadline;

    /**
     * 
     */
    private String attachmentUrl;

    /**
     * 
     */
    private Date createdAt;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 
     */
    public Integer getClassId() {
        return classId;
    }

    /**
     * 
     */
    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    /**
     * 
     */
    public Integer getTeacherId() {
        return teacherId;
    }

    /**
     * 
     */
    public void setTeacherId(Integer teacherId) {
        this.teacherId = teacherId;
    }

    /**
     * 
     */
    public String getCourseName() {
        return courseName;
    }

    /**
     * 
     */
    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    /**
     * 
     */
    public String getHomeworkTitle() {
        return homeworkTitle;
    }

    /**
     * 
     */
    public void setHomeworkTitle(String homeworkTitle) {
        this.homeworkTitle = homeworkTitle;
    }

    /**
     * 
     */
    public String getHomeworkContent() {
        return homeworkContent;
    }

    /**
     * 
     */
    public void setHomeworkContent(String homeworkContent) {
        this.homeworkContent = homeworkContent;
    }

    /**
     * 
     */
    public Date getPublishDate() {
        return publishDate;
    }

    /**
     * 
     */
    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }

    /**
     * 
     */
    public Date getDeadline() {
        return deadline;
    }

    /**
     * 
     */
    public void setDeadline(Date deadline) {
        this.deadline = deadline;
    }

    /**
     * 
     */
    public String getAttachmentUrl() {
        return attachmentUrl;
    }

    /**
     * 
     */
    public void setAttachmentUrl(String attachmentUrl) {
        this.attachmentUrl = attachmentUrl;
    }

    /**
     * 
     */
    public Date getCreatedAt() {
        return createdAt;
    }

    /**
     * 
     */
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        homework other = (homework) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId()))
            && (this.getTeacherId() == null ? other.getTeacherId() == null : this.getTeacherId().equals(other.getTeacherId()))
            && (this.getCourseName() == null ? other.getCourseName() == null : this.getCourseName().equals(other.getCourseName()))
            && (this.getHomeworkTitle() == null ? other.getHomeworkTitle() == null : this.getHomeworkTitle().equals(other.getHomeworkTitle()))
            && (this.getHomeworkContent() == null ? other.getHomeworkContent() == null : this.getHomeworkContent().equals(other.getHomeworkContent()))
            && (this.getPublishDate() == null ? other.getPublishDate() == null : this.getPublishDate().equals(other.getPublishDate()))
            && (this.getDeadline() == null ? other.getDeadline() == null : this.getDeadline().equals(other.getDeadline()))
            && (this.getAttachmentUrl() == null ? other.getAttachmentUrl() == null : this.getAttachmentUrl().equals(other.getAttachmentUrl()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode());
        result = prime * result + ((getTeacherId() == null) ? 0 : getTeacherId().hashCode());
        result = prime * result + ((getCourseName() == null) ? 0 : getCourseName().hashCode());
        result = prime * result + ((getHomeworkTitle() == null) ? 0 : getHomeworkTitle().hashCode());
        result = prime * result + ((getHomeworkContent() == null) ? 0 : getHomeworkContent().hashCode());
        result = prime * result + ((getPublishDate() == null) ? 0 : getPublishDate().hashCode());
        result = prime * result + ((getDeadline() == null) ? 0 : getDeadline().hashCode());
        result = prime * result + ((getAttachmentUrl() == null) ? 0 : getAttachmentUrl().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", classId=").append(classId);
        sb.append(", teacherId=").append(teacherId);
        sb.append(", courseName=").append(courseName);
        sb.append(", homeworkTitle=").append(homeworkTitle);
        sb.append(", homeworkContent=").append(homeworkContent);
        sb.append(", publishDate=").append(publishDate);
        sb.append(", deadline=").append(deadline);
        sb.append(", attachmentUrl=").append(attachmentUrl);
        sb.append(", createdAt=").append(createdAt);
        sb.append("]");
        return sb.toString();
    }
}